Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-799408: Close temp file handle before removing temp cache file #1582

Conversation

sfc-gh-aling
Copy link
Collaborator

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-799408

temp file is already an open file handle, instead of opening it again, we directly write the bytes into the file handle and then close the fd

  1. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  2. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

@sfc-gh-aling sfc-gh-aling marked this pull request as draft May 25, 2023 00:04
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #1582 (684799a) into main (36e20a0) will decrease coverage by 0.23%.
The diff coverage is 100.00%.

❗ Current head 684799a differs from pull request most recent head 05f4199. Consider uploading reports for the commit 05f4199 to get more accurate results

@@            Coverage Diff             @@
##             main    #1582      +/-   ##
==========================================
- Coverage   82.51%   82.29%   -0.23%     
==========================================
  Files          62       62              
  Lines        8815     8815              
  Branches     1305     1305              
==========================================
- Hits         7274     7254      -20     
- Misses       1206     1219      +13     
- Partials      335      342       +7     
Impacted Files Coverage Δ
src/snowflake/connector/cache.py 87.29% <100.00%> (+0.33%) ⬆️

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sfc-gh-aling sfc-gh-aling force-pushed the SNOW-799408-connector-not-handling-ocsp-response-validation-cache-file-correctly-in-windows branch from 05f4199 to eed93b1 Compare June 1, 2023 15:31
@sfc-gh-aling sfc-gh-aling marked this pull request as ready for review June 2, 2023 03:26
src/snowflake/connector/cache.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@sfc-gh-mkeller sfc-gh-mkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 🚢

@sfc-gh-aling sfc-gh-aling merged commit 48aa932 into main Jun 6, 2023
@sfc-gh-aling sfc-gh-aling deleted the SNOW-799408-connector-not-handling-ocsp-response-validation-cache-file-correctly-in-windows branch June 6, 2023 23:29
@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants